package org.zn.plus.mybatis.sql.builder.model;

import org.apache.commons.lang3.StringUtils;
import org.zn.plus.mybatis.sql.builder.constant.ColumnType;



public class SelectColumn  implements Fragment{
	
	public static final String clazz="selectColumn";
	
	private String name;
	private String alias=StringUtils.EMPTY;
	private QueryFunction function;
	private QueryTable subQuery;
	
	//ColumnType
	private String type=ColumnType.COL;
	

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAlias() {
		return alias.equals(StringUtils.EMPTY)?name:alias;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	public QueryTable getSubQuery() {
		return subQuery;
	}
	public void setSubQuery(QueryTable subQuery) {
		this.subQuery = subQuery;
	}
	public QueryFunction getFunction() {
		return function;
	}
	public void setFunction(QueryFunction function) {
		this.function = function;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	
	
	
	@Override
	public Fragment self() {
		// TODO Auto-generated method stub
		return this;
	}
	

}
